package com.hwh.bootdemoweb.Netty第四章;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author wenhao hu
 * @title: Client
 * @projectName bootdemoweb
 * @description: TODO
 * @date 2021/12/1314:15
 */
public class Client {
    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress(8080));
        sc.write(Charset.defaultCharset().encode("你好啊你好啊你好啊你好啊你好啊"));
        System.out.println("waiting....");
    }
}
